package com.yuandengta.yomall.search.vo;


import com.yuandengta.common.to.es.SkuEsModel;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * 商品检索结果 {@link SearchResponseVO}
 *
 * @author Kevin
 * @email: 178676392@qq.com
 */
@Data
public class SearchResponseVO {
    {
        navs = new ArrayList<>();
        attrIds = new ArrayList<>();
    }
    /**
     * 检索到的所有商品信息
     */
    private List<SkuEsModel> products;

    /**
     * 当前页面
     */
    private Integer pageNum;
    /**
     * 总记录数
     */
    private Long totalCount;
    /**
     * 总页码
     */
    private Integer totalPage;
    /**
     * 导航页
     */
    private List<Integer> pageNavs;

    /**
     * 检索到的结果所涉及的所有品牌
     */
    private List<BrandVO> brands;
    /**
     * 检索结果涉及的所有分类
     */
    private List<CatalogVO> catalogs;
    /**
     * 检索结果涉及的商品属性
     */
    private List<AttrVO> attrs;

    /**
     * 面包屑导航
     */
    private List<NavVO> navs;
    private List<Long> attrIds;

    @Data
    public static class NavVO {
        private String navName;
        private String navValue;
        private String link;
    }

    @Data
    public static class BrandVO {
        private Long brandId;
        private String brandName;
        private String brandImg;
    }

    @Data
    public static class CatalogVO {
        private Long catalogId;
        private String catalogName;
    }

    @Data
    public static class AttrVO {
        private Long attrId;
        private String attrName;
        private List<String> attrValues;
    }
}
